<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/webCommon/webCommon.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>分组创建</title>
<!-- 默认选中题目名称-开始 -->
<script type="text/javascript" >
 $(document).ready(function(){
		$(".college").each(function(){//循环获取所有分组编号 
			var titleInfId = $(this).attr("value");
			var titleInf = $("#sysTitleInformationId").attr("value");
			if(titleInfId == titleInf){
				$(this).attr("selected","selected");				
		}	
		});
	 });
</script>
<!-- 默认选中学题目名称-结束 -->

<script type="text/javascript" src="plugins/layui/layui.js"></script>
		<script>
			layui.use(['form', 'layedit', 'laydate'], function() {
				var form = layui.form(),
					layer = layui.layer,
					layedit = layui.layedit,
					laydate = layui.laydate;
				 //监听提交
				form.on('submit(tijiao)', function(data) {
					layer.alert(JSON.stringify(data.field), {
						title: '最终的提交信息'
					})
				});
			});
		</script>

</head>

<body>
	<div style="margin: 15px;">
		 <form class="layui-form" action="<%=path %>/sys/ServiceStudentGroup_add.action">
			<div class="layui-form-item">
				<label class="layui-form-label">分组名称</label>
				<div class="layui-input-inline">
					<input type="text" name="studentGroupName" lay-verify="studentGroupName" autocomplete="off" placeholder="这里输入分组名称" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">题目</label>
				<div class="layui-input-inline">
						<select name="titleInfId" id="titleInfId" value ="">
							<option value="">请选择...</option>
							<s:iterator value="sysTitleInformationAllList">
							<option  class ="titleInf" value="${titleInfId}"  id="${titleInfId}">${titleInfName}</option>
							</s:iterator>
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">组员</label>
				<div class="layui-input-inline">
						<select name="sysUser.userId" id="sysUser.userId">
							<option value="">请选择组员</option>
							<s:iterator value="sysStuUsersAllList">
							<option  class ="user" value="${userId}"  id="${userId}">${userName}</option>
							</s:iterator>
						</select>
					</div>
				</div>
				<div class="layui-form-item">
				<label class="layui-form-label">组员</label>
				<div class="layui-input-inline">
						<select name="userIdOne" id="userIdOne">
							<option value="">请选择其他组员</option>
							<s:iterator value="sysStuUsersAllList">
							<option  class ="user" value="${userId}"  id="${userId}">${userName}</option>
							</s:iterator>
						</select>
					</div>
				</div>
				<div class="layui-form-item">
				<label class="layui-form-label">组员</label>
				<div class="layui-input-inline">
						<select name="userIdTwo" id="userIdTwo">
							<option value="">请选择其他组员</option>
							<s:iterator value="sysStuUsersAllList">
							<option  class ="user" value="${userId}"  id="${userId}">${userName}</option>
							</s:iterator>
						</select>
					</div>
				</div>
								
			</div>
                <div class="layui-form-item">
					<div class="layui-input-block">
						<button id="tijiao" class="layui-btn" lay-filter="tijiao" lay-submit="">创建</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
				</form>   
				 <input name="sysTitleInformation.titleInfId" type="hidden" id="sysTitleInformationId" value="${sysTitleInformation.titleInfId}"/>  <!-- 用于下拉选择的读取-题目 -->
				
</body>
</html>
